function goBack(){
    if(document.referrer ==''|| document.referrer.indexOf(window.location.host) == -1){
        window.location = '/'
    }else{
        window.history.go(-1);
    }
}
jQuery(document).ready(function () {
    $('[data-click=open]').on('click',function(){
        $(this).parent().siblings('.content').toggleClass('active');
        $(this).find('i').toggleClass('handstand');
    });
    $('.classification li.text').on('click',function(){
        location.href=$(this).attr("href");
    });
    $('.flexbox .update').on('click',function(){
        location.href=$(this).attr("href");
    });
    //banner
    var headBanner = new Swiper('.banner',{
        slidesPerView: 3,
        spaceBetween: 10,
        autoplay : 2000,
        pagination: {
            el: ".swiper-pagination",
            clickable: true
        }
    });
    $('.close').on('click',function(){
        $.cookie("app_download", "1", { expires: 1 });
        $(this).parent().hide();
    });
    $('.nav_more .search').on('click',function(e){
        location.href = '/search'
    });
    var nav_moreBoorlean = true;
    $('.nav_more .more').on('click',function(e){
        if(nav_moreBoorlean){
            nav_moreBoorlean = false;
            $('html').css('overflow-y','hidden');
            $('body').css({'height':'100%','overflow':'hidden'});
        }else{
            nav_moreBoorlean = true;
            $('html').css('overflow-y','scroll');
        }
        $('.classification_float').toggle();
    });
    if($('.cartoon_introduce .introduce p').height() >=79){
        $('.cartoon_introduce .introduce p').addClass('ellipsis');
        var introduceMore = true;
        $('.introduce_more').on('click',function(){
            if(introduceMore){
                introduceMore = false;
                $(this).siblings('p').removeClass('ellipsis');
                $(this).val('收起');
            }else{
                introduceMore = true;
                $(this).siblings('p').addClass('ellipsis');
                $(this).val('更多');
            }

        });
    }else{
        $('.introduce_more').hide();
    };
});
